"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = require("./base");
class MonthPartDescriber extends base_1.Describer {
    // *
    starSegment(exp) {
        return '每月';
    }
    // */3
    starSlashNumberSegment(exp) {
        const interval = exp.replace(`*/`, '');
        return `每${interval}个月`;
    }
    // 1-9/3
    spanSlashNumberSegment(exp) {
        const [_, start, end, interval] = exp.match(/^(\d+)-(\d+)\/(\d+)$/);
        return `${base_1.NUMBER_MAP_CHINESE[start]}到${base_1.MONTH_MAP_ARRAY[end]}中的每${interval}个月`;
    }
    //1-9
    spanSegment(exp) {
        const [_, start, end] = exp.match(/^(\d+)-(\d+)$/);
        return `${base_1.NUMBER_MAP_CHINESE[start]}到${base_1.MONTH_MAP_ARRAY[end]}`;
    }
    // 3
    singleNumberSegment(exp) {
        return base_1.MONTH_MAP_ARRAY[exp] || exp;
    }
}
exports.MonthPartDescriber = MonthPartDescriber;
